<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

    <title>XX | Register</title>

    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link th:href="@{/font-awesome/css/font-awesome.css}" rel="stylesheet"/>
    <link th:href="@{/css/plugins/iCheck/custom.css}" rel="stylesheet"/>
    <link th:href="@{/css/animate.css}" rel="stylesheet"/>
    <link th:href="@{/css/style.css}" rel="stylesheet"/>

</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen   animated fadeInDown">
        <div>
            <div>
                <h2 class="logo-name">XX</h2>
            </div>
            <h3>Register to XX</h3>
            <p>Create account to see it in action.</p>
            <form class="m-t" role="form"  action="register"   th:method="post" >
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="Name" name="userName" required=""/>
                </div>
                <div class="form-group">
                    <input type="email" class="form-control" placeholder="Email" name="email" required=""/>
                </div>
                <div class="form-group">
                    <input type="password" class="form-control" placeholder="Password" name="password" required=""/>
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="真实姓名" name="realName" required=""/>
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="联系方式" name="phoneNumber" required=""/>
                </div>
                <div class="form-group">
                        <div class="checkbox i-checks"><label> <input type="checkbox"/><i></i> Agree the terms and policy </label></div>
                </div>
                <button type="submit" class="btn btn-primary block full-width m-b">Register</button>

                <p class="text-muted text-center"><small>Already have an account?</small></p>
                <a class="btn btn-sm btn-white btn-block" th:href="login" href="login.html">Login</a>
            </form>
            <p class="m-t"> <small>we app framework base on Bootstrap 3 &copy; 2019</small> </p>
        </div>
    </div>

    <!-- Mainly scripts -->
    <script th:src="@{/js/jquery-2.1.1.js}"></script>
    <script th:src="@{/js/bootstrap.min.js}"></script>
    <!-- Sweet alert -->
    <script th:src="@{/js/plugins/sweetalert/sweetalert.min.js}"></script>

    <!-- iCheck -->
    <script th:src="@{/js/plugins/iCheck/icheck.min.js}"></script>
    <script>
        $(document).ready(function(){
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });
    </script>

    <!-- Mainly scripts -->
    <script th:src="@{/js/jquery-2.1.1.js}"></script>
    <script th:src="@{/js/bootstrap.min.js}"></script>
    <!-- Sweet alert -->
    <script th:src="@{/js/plugins/sweetalert/sweetalert.min.js}"></script>

    <script th:inline="javascript">
        var success = [[${success}]];
        $(document).ready(function () {
            if(success!=null){
                swal({
                    title : "注册成功",
                    text : success
                });
            }
        });
    </script>

</body>

</html>
